package com.xuzimian.globaldemo.aws.cloud.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }


//    @Bean
//    public WebMvcConfigurer corsConfigurer() {
//        return new WebMvcConfigurer() {
//            @Override
//            public void addCorsMappings(CorsRegistry registry) {
//                registry.addMapping("/**").allowedOrigins("*")
//                        // 允许发送Cookie
//                        .allowCredentials(true)
//                        // 允许所有方法
//                        .allowedMethods("GET", "POST", "PUT", "DELETE", "HEAD");
//            }
//        };
//    }

}
